<#assign pageTitle = "第三方登录" />
<#assign pageHeader>
    <style>
        .u-m-c-wrap .Binding {
            margin: 50px auto 0;
            width: 640px;
        }
        .tac {
            text-align: center;
        }
        .f-fM, tt, select, input, samp {
            font-family: "Hiragino Sans GB", "Microsoft YaHei";
        }
        .c-orange, .error {
            color: #ff7a01;
        }
        .clearfix::after {
            clear: both;
            content: "";
            display: block;
            height: 0;
            overflow: hidden;
        }
        .u-m-c-wrap .Binding-list {
            margin-top: 60px;
        }
        .u-m-c-wrap .Binding-list li {
            float: left;
            text-align: center;
            width: 33.3%;
        }
        .u-m-c-wrap .Binding-list .Binding-qq span {
            background: rgba(0, 0, 0, 0) url("/static/qdxwx/img/bd-qq.png") no-repeat scroll center center;
        }
        .u-m-c-wrap .Binding-list .Binding-xl span {
            background: rgba(0, 0, 0, 0) url("/static/qdxwx/img/bd-xl.png") no-repeat scroll center center;
        }
        .u-m-c-wrap .Binding-list .Binding-wx span {
            background: rgba(0, 0, 0, 0) url("/static/qdxwx/img/bd-wx.png") no-repeat scroll center center;
        }
        .u-m-c-wrap .Binding-list li span {
            display: inline-block;
            height: 65px;
            width: 65px;
        }
        .u-m-c-wrap .Binding-list li .ljbd-btn, .uploadBtnWrap .ljbd-btn {
            background-color: #72cd91;
            border-radius: 3px;
            color: #fff;
            display: inline-block;
            font: 14px/32px "Microsoft YaHei";
            height: 32px;
            text-align: center;
            text-decoration: none;
            width: 108px;
        }
    </style>
</#assign>
<#assign pageContent>
<article class="w75 fl u-m-c-wrap">
    <div class="u-r-cont">
        <section>
            <div>
                <section class="c-infor-tabTitle c-tab-title">
                    <a href="javascript: void(0)" title="Wo的第三方登录"  class="c-title-name c-tab-title">Wo的第三方登录</a>
                </section>
            </div>
            <section >
                <div class="Binding"><p class="fsize14 f-fM c-orange hLh30 tac">绑定第三方账号，可以直接登录。</p>
                    <ul class="Binding-list clearfix">
                        <#if 'ON'==WEIXIN_LOGIN_IS_OPEN>
                            <li class="Binding-wx">
                                <div><span class="img">&nbsp;</span>
                                    <p class="fsize14 f-fM c-333 tac mt20">
                                            <#if !userThirdWeiXin.id??>
                                                    <#if userThirdWeiXin.name??>
                                                    ${userThirdWeiXin.name}
                                                    <#else>
                                                    </#if>
                                            <#else>
                                            </#if>
                                    </p>
                                        <#if userThirdWeiXin.id??><a href="javascript:void(0)" onclick="removeBinding(${userThirdWeiXin.id!0})" class="ljbd-btn mt20">解除绑定</a>
                                        <#else>
                                        <a href="/auth/wechat/login" class="ljbd-btn mt20">立即绑定</a>
                                        </#if>
                                </div>
                            </li>
                        </#if>
                    </ul>
                </div>
            </section>
        </section>
        <!-- /我的资料 -->
    </div>
</article>
<!-- /右侧内容区 结束 -->
</#assign>
<#assign pageFooter>
<script>
    //解绑
    function removeBinding(id) {
        if (confirm("是否解绑此账号?")) {
            $.ajax({
                url: "/user/ajax/removeBinding",
                data: {"id": id},
                type: "post",
                dataType: "json",
                cache: false,
                async: false,
                success: function (result) {
                    //关闭上次弹窗
                    $(".dialog-shadow").remove();
                    layer.msg(result.msg);
                    $(".order-submit").click(function () {
                        window.location.href = "/user/threeBind";
                    });
                }
            });
        }
    }
</script>
</#assign>
<#include "../layouts/layout_uc.ftl">